html,
body {
  font-family: -apple-system, "BlinkMacSystemFont", sans-serif;
  margin: 0;
  background-color: aliceblue;
  scroll-behavior: smooth;
}

body {
  padding: 0 15px;
}

nav {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #fff;
  padding: 10px 0;
  border-radius: 4px;
  overflow: hidden;
}
nav a {
  position: relative;
  display: block;
  line-height: 2;
  padding: 0 15px;
  font-size: 14px;
  color: #191919;
  text-decoration: none;
  animation: active;
  animation-timeline: var(--s);
  border-left: 4px solid transparent;
}
nav a:hover {
  background-color: rgba(213, 213, 213, 0.2901960784);
}

.content {
  view-timeline-name: var(--s);
  view-timeline-inset: 80% 20%;
}
.content h2 {
  margin: 0;
  padding: 0.8em 0;
  scroll-margin: 20px;
}
.content div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.content div span {
  width: 30%;
  height: 100px;
  border-radius: 4px;
  background-color: #e4ccff;
}

@keyframes active {
  0%, 100% {
    color: #6f00ff;
    border-color: #6f00ff;
  }
}